source = $this->getSourceContext(); $this->parent = false; $this->blocks = [ ]; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; // line 1 echo "
"; // line 2 echo PhpMyAdmin\Url::getHiddenInputs(($context["db"] ?? null), ($context["table"] ?? null)); echo " "; // line 4 echo " "; if (PhpMyAdmin\Util::isForeignKeySupported(($context["tbl_storage_engine"] ?? null))) { // line 5 echo "
"; // line 6 echo _gettext("Foreign key constraints"); echo "
"; // line 12 if ((twig_upper_filter($this->env, ($context["tbl_storage_engine"] ?? null)) == "INNODB")) { // line 13 echo " "; } else { // line 18 echo " "; } // line 23 echo " "; // line 36 $context["i"] = 0; // line 37 echo " "; if ( !twig_test_empty(($context["existrel_foreign"] ?? null))) { // line 38 echo " "; $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["existrel_foreign"] ?? null)); foreach ($context['_seq'] as $context["key"] => $context["one_key"]) { // line 39 echo " "; // line 40 echo " "; $context["foreign_db"] = (((twig_get_attribute($this->env, $this->source, $context["one_key"], "ref_db_name", [], "array", true, true, false, 40) && !(null === (($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = // line 41 $context["one_key"]) && is_array($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) || $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 instanceof ArrayAccess ? ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4["ref_db_name"] ?? null) : null)))) ? ((($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 = // line 42 $context["one_key"]) && is_array($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144) || $__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 instanceof ArrayAccess ? ($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144["ref_db_name"] ?? null) : null)) : (($context["db"] ?? null))); // line 43 echo " "; $context["foreign_table"] = false; // line 44 echo " "; if (($context["foreign_db"] ?? null)) { // line 45 echo " "; $context["foreign_table"] = (((twig_get_attribute($this->env, $this->source, $context["one_key"], "ref_table_name", [], "array", true, true, false, 45) && !(null === (($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b = // line 46 $context["one_key"]) && is_array($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b) || $__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b instanceof ArrayAccess ? ($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b["ref_table_name"] ?? null) : null)))) ? ((($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002 = // line 47 $context["one_key"]) && is_array($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002) || $__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002 instanceof ArrayAccess ? ($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002["ref_table_name"] ?? null) : null)) : (false)); // line 48 echo " "; } // line 49 echo " "; $context["unique_columns"] = []; // line 50 echo " "; if ((($context["foreign_db"] ?? null) && ($context["foreign_table"] ?? null))) { // line 51 echo " "; $context["table_obj"] = PhpMyAdmin\Table::get(($context["foreign_table"] ?? null), ($context["foreign_db"] ?? null)); // line 52 echo " "; $context["unique_columns"] = twig_get_attribute($this->env, $this->source, ($context["table_obj"] ?? null), "getUniqueColumns", [0 => false, 1 => false], "method", false, false, false, 52); // line 53 echo " "; } // line 54 echo " "; $this->loadTemplate("table/relation/foreign_key_row.twig", "table/relation/common_form.twig", 54)->display(twig_to_array(["i" => // line 55 ($context["i"] ?? null), "one_key" => // line 56 $context["one_key"], "column_array" => // line 57 ($context["column_array"] ?? null), "options_array" => // line 58 ($context["options_array"] ?? null), "tbl_storage_engine" => // line 59 ($context["tbl_storage_engine"] ?? null), "db" => // line 60 ($context["db"] ?? null), "table" => // line 61 ($context["table"] ?? null), "url_params" => // line 62 ($context["url_params"] ?? null), "databases" => // line 63 ($context["databases"] ?? null), "foreign_db" => // line 64 ($context["foreign_db"] ?? null), "foreign_table" => // line 65 ($context["foreign_table"] ?? null), "unique_columns" => // line 66 ($context["unique_columns"] ?? null)])); // line 68 echo " "; $context["i"] = (($context["i"] ?? null) + 1); // line 69 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['key'], $context['one_key'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 70 echo " "; } // line 71 echo " "; $this->loadTemplate("table/relation/foreign_key_row.twig", "table/relation/common_form.twig", 71)->display(twig_to_array(["i" => // line 72 ($context["i"] ?? null), "one_key" => [], "column_array" => // line 74 ($context["column_array"] ?? null), "options_array" => // line 75 ($context["options_array"] ?? null), "tbl_storage_engine" => // line 76 ($context["tbl_storage_engine"] ?? null), "db" => // line 77 ($context["db"] ?? null), "table" => // line 78 ($context["table"] ?? null), "url_params" => // line 79 ($context["url_params"] ?? null), "databases" => // line 80 ($context["databases"] ?? null), "foreign_db" => // line 81 ($context["foreign_db"] ?? null), "foreign_table" => // line 82 ($context["foreign_table"] ?? null), "unique_columns" => // line 83 ($context["unique_columns"] ?? null)])); // line 85 echo " "; $context["i"] = (($context["i"] ?? null) + 1); // line 86 echo "
"; // line 10 echo _gettext("Actions"); echo " "; // line 11 echo _gettext("Constraint properties"); echo " "; // line 14 echo _gettext("Column"); // line 15 echo " "; echo PhpMyAdmin\Util::showHint(_gettext("Creating a foreign key over a non-indexed column would automatically create an index on it. Alternatively, you can define an index below, before creating the foreign key.")); echo " "; // line 19 echo _gettext("Column"); // line 20 echo " "; echo PhpMyAdmin\Util::showHint(_gettext("Only columns with index will be displayed. You can define an index below.")); echo " "; // line 24 echo _gettext("Foreign key constraint"); // line 25 echo " ("; echo twig_escape_filter($this->env, ($context["tbl_storage_engine"] ?? null), "html", null, true); echo ")
"; // line 32 echo _gettext("Database"); echo " "; // line 33 echo _gettext("Table"); echo " "; // line 34 echo _gettext("Column"); echo "
"; // line 89 echo _gettext("+ Add constraint"); // line 90 echo "
"; } // line 96 echo " "; // line 97 if ((($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4 = ($context["cfg_relation"] ?? null)) && is_array($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4) || $__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4 instanceof ArrayAccess ? ($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4["relwork"] ?? null) : null)) { // line 98 echo " "; if (PhpMyAdmin\Util::isForeignKeySupported(($context["tbl_storage_engine"] ?? null))) { // line 99 echo " "; echo PhpMyAdmin\Util::getDivForSliderEffect("ir_div", _gettext("Internal relationships")); echo " "; } // line 101 echo "
"; // line 104 echo _gettext("Internal relationships"); // line 105 echo " "; echo PhpMyAdmin\Util::showDocu("config", "cfg_Servers_relation"); echo " "; // line 115 $context["saved_row_cnt"] = (twig_length_filter($this->env, ($context["save_row"] ?? null)) - 1); // line 116 echo " "; $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(range(0, ($context["saved_row_cnt"] ?? null))); foreach ($context['_seq'] as $context["_key"] => $context["i"]) { // line 117 echo " "; $context["myfield"] = (($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666 = (($__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e = ($context["save_row"] ?? null)) && is_array($__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e) || $__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e instanceof ArrayAccess ? ($__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e[$context["i"]] ?? null) : null)) && is_array($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666) || $__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666 instanceof ArrayAccess ? ($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666["Field"] ?? null) : null); // line 118 echo " "; // line 120 echo " "; $context["myfield_md5"] = md5(($context["myfield"] ?? null)); // line 121 echo " "; // line 122 $context["foreign_table"] = false; // line 123 echo " "; $context["foreign_column"] = false; // line 124 echo " "; // line 126 echo " "; if (twig_get_attribute($this->env, $this->source, ($context["existrel"] ?? null), ($context["myfield"] ?? null), [], "array", true, true, false, 126)) { // line 127 echo " "; $context["foreign_db"] = (($__internal_63ad1f9a2bf4db4af64b010785e9665558fdcac0e8db8b5b413ed986c62dbb52 = (($__internal_f10a4cc339617934220127f034125576ed229e948660ebac906a15846d52f136 = ($context["existrel"] ?? null)) && is_array($__internal_f10a4cc339617934220127f034125576ed229e948660ebac906a15846d52f136) || $__internal_f10a4cc339617934220127f034125576ed229e948660ebac906a15846d52f136 instanceof ArrayAccess ? ($__internal_f10a4cc339617934220127f034125576ed229e948660ebac906a15846d52f136[($context["myfield"] ?? null)] ?? null) : null)) && is_array($__internal_63ad1f9a2bf4db4af64b010785e9665558fdcac0e8db8b5b413ed986c62dbb52) || $__internal_63ad1f9a2bf4db4af64b010785e9665558fdcac0e8db8b5b413ed986c62dbb52 instanceof ArrayAccess ? ($__internal_63ad1f9a2bf4db4af64b010785e9665558fdcac0e8db8b5b413ed986c62dbb52["foreign_db"] ?? null) : null); // line 128 echo " "; } else { // line 129 echo " "; $context["foreign_db"] = ($context["db"] ?? null); // line 130 echo " "; } // line 131 echo " "; // line 133 echo " "; $context["tables"] = []; // line 134 echo " "; if (($context["foreign_db"] ?? null)) { // line 135 echo " "; if (twig_get_attribute($this->env, $this->source, ($context["existrel"] ?? null), ($context["myfield"] ?? null), [], "array", true, true, false, 135)) { // line 136 echo " "; $context["foreign_table"] = (($__internal_887a873a4dc3cf8bd4f99c487b4c7727999c350cc3a772414714e49a195e4386 = (($__internal_d527c24a729d38501d770b40a0d25e1ce8a7f0bff897cc4f8f449ba71fcff3d9 = ($context["existrel"] ?? null)) && is_array($__internal_d527c24a729d38501d770b40a0d25e1ce8a7f0bff897cc4f8f449ba71fcff3d9) || $__internal_d527c24a729d38501d770b40a0d25e1ce8a7f0bff897cc4f8f449ba71fcff3d9 instanceof ArrayAccess ? ($__internal_d527c24a729d38501d770b40a0d25e1ce8a7f0bff897cc4f8f449ba71fcff3d9[($context["myfield"] ?? null)] ?? null) : null)) && is_array($__internal_887a873a4dc3cf8bd4f99c487b4c7727999c350cc3a772414714e49a195e4386) || $__internal_887a873a4dc3cf8bd4f99c487b4c7727999c350cc3a772414714e49a195e4386 instanceof ArrayAccess ? ($__internal_887a873a4dc3cf8bd4f99c487b4c7727999c350cc3a772414714e49a195e4386["foreign_table"] ?? null) : null); // line 137 echo " "; } // line 138 echo " "; $context["tables"] = twig_get_attribute($this->env, $this->source, ($context["dbi"] ?? null), "getTables", [0 => ($context["foreign_db"] ?? null)], "method", false, false, false, 138); // line 139 echo " "; } // line 140 echo " "; // line 142 echo " "; $context["unique_columns"] = []; // line 143 echo " "; if ((($context["foreign_db"] ?? null) && ($context["foreign_table"] ?? null))) { // line 144 echo " "; if (twig_get_attribute($this->env, $this->source, ($context["existrel"] ?? null), ($context["myfield"] ?? null), [], "array", true, true, false, 144)) { // line 145 echo " "; $context["foreign_column"] = (($__internal_f6dde3a1020453fdf35e718e94f93ce8eb8803b28cc77a665308e14bbe8572ae = (($__internal_25c0fab8152b8dd6b90603159c0f2e8a936a09ab76edb5e4d7bc95d9a8d2dc8f = ($context["existrel"] ?? null)) && is_array($__internal_25c0fab8152b8dd6b90603159c0f2e8a936a09ab76edb5e4d7bc95d9a8d2dc8f) || $__internal_25c0fab8152b8dd6b90603159c0f2e8a936a09ab76edb5e4d7bc95d9a8d2dc8f instanceof ArrayAccess ? ($__internal_25c0fab8152b8dd6b90603159c0f2e8a936a09ab76edb5e4d7bc95d9a8d2dc8f[($context["myfield"] ?? null)] ?? null) : null)) && is_array($__internal_f6dde3a1020453fdf35e718e94f93ce8eb8803b28cc77a665308e14bbe8572ae) || $__internal_f6dde3a1020453fdf35e718e94f93ce8eb8803b28cc77a665308e14bbe8572ae instanceof ArrayAccess ? ($__internal_f6dde3a1020453fdf35e718e94f93ce8eb8803b28cc77a665308e14bbe8572ae["foreign_field"] ?? null) : null); // line 146 echo " "; } // line 147 echo " "; $context["table_obj"] = PhpMyAdmin\Table::get(($context["foreign_table"] ?? null), ($context["foreign_db"] ?? null)); // line 148 echo " "; $context["unique_columns"] = twig_get_attribute($this->env, $this->source, ($context["table_obj"] ?? null), "getUniqueColumns", [0 => false, 1 => false], "method", false, false, false, 148); // line 149 echo " "; } // line 150 echo " "; // line 151 $this->loadTemplate("table/relation/internal_relational_row.twig", "table/relation/common_form.twig", 151)->display(twig_to_array(["myfield" => // line 152 ($context["myfield"] ?? null), "myfield_md5" => // line 153 ($context["myfield_md5"] ?? null), "databases" => // line 154 ($context["databases"] ?? null), "tables" => // line 155 ($context["tables"] ?? null), "columns" => // line 156 ($context["unique_columns"] ?? null), "foreign_db" => // line 157 ($context["foreign_db"] ?? null), "foreign_table" => // line 158 ($context["foreign_table"] ?? null), "foreign_column" => // line 159 ($context["foreign_column"] ?? null)])); // line 161 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 162 echo "
"; // line 109 echo _gettext("Column"); echo " "; // line 110 echo _gettext("Internal relation"); // line 111 echo " "; if (PhpMyAdmin\Util::isForeignKeySupported(($context["tbl_storage_engine"] ?? null))) { // line 112 echo " "; echo PhpMyAdmin\Util::showHint(_gettext("An internal relation is not necessary when a corresponding FOREIGN KEY relation exists.")); echo " "; } // line 114 echo "
"; // line 164 if (PhpMyAdmin\Util::isForeignKeySupported(($context["tbl_storage_engine"] ?? null))) { // line 165 echo " "; } // line 167 echo " "; } // line 168 echo " "; // line 169 if ((($__internal_f769f712f3484f00110c86425acea59f5af2752239e2e8596bcb6effeb425b40 = ($context["cfg_relation"] ?? null)) && is_array($__internal_f769f712f3484f00110c86425acea59f5af2752239e2e8596bcb6effeb425b40) || $__internal_f769f712f3484f00110c86425acea59f5af2752239e2e8596bcb6effeb425b40 instanceof ArrayAccess ? ($__internal_f769f712f3484f00110c86425acea59f5af2752239e2e8596bcb6effeb425b40["displaywork"] ?? null) : null)) { // line 170 echo " "; $context["disp"] = call_user_func_array($this->env->getFunction('Relation_getDisplayField')->getCallable(), [($context["db"] ?? null), ($context["table"] ?? null)]); // line 171 echo "
"; } // line 186 echo "
"; } public function getTemplateName() { return "table/relation/common_form.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 451 => 189, 447 => 188, 443 => 186, 438 => 183, 429 => 180, 426 => 179, 423 => 178, 421 => 177, 417 => 176, 413 => 175, 407 => 172, 404 => 171, 401 => 170, 399 => 169, 396 => 168, 393 => 167, 389 => 165, 387 => 164, 383 => 162, 377 => 161, 375 => 159, 374 => 158, 373 => 157, 372 => 156, 371 => 155, 370 => 154, 369 => 153, 368 => 152, 367 => 151, 364 => 150, 361 => 149, 358 => 148, 355 => 147, 352 => 146, 349 => 145, 346 => 144, 343 => 143, 340 => 142, 337 => 140, 334 => 139, 331 => 138, 328 => 137, 325 => 136, 322 => 135, 319 => 134, 316 => 133, 313 => 131, 310 => 130, 307 => 129, 304 => 128, 301 => 127, 298 => 126, 295 => 124, 292 => 123, 290 => 122, 287 => 121, 284 => 120, 282 => 118, 279 => 117, 274 => 116, 272 => 115, 269 => 114, 263 => 112, 260 => 111, 258 => 110, 254 => 109, 246 => 105, 244 => 104, 239 => 101, 233 => 99, 230 => 98, 228 => 97, 225 => 96, 217 => 90, 215 => 89, 210 => 86, 207 => 85, 205 => 83, 204 => 82, 203 => 81, 202 => 80, 201 => 79, 200 => 78, 199 => 77, 198 => 76, 197 => 75, 196 => 74, 195 => 72, 193 => 71, 190 => 70, 184 => 69, 181 => 68, 179 => 66, 178 => 65, 177 => 64, 176 => 63, 175 => 62, 174 => 61, 173 => 60, 172 => 59, 171 => 58, 170 => 57, 169 => 56, 168 => 55, 166 => 54, 163 => 53, 160 => 52, 157 => 51, 154 => 50, 151 => 49, 148 => 48, 146 => 47, 145 => 46, 143 => 45, 140 => 44, 137 => 43, 135 => 42, 134 => 41, 132 => 40, 130 => 39, 125 => 38, 122 => 37, 120 => 36, 115 => 34, 111 => 33, 107 => 32, 96 => 25, 94 => 24, 91 => 23, 84 => 20, 82 => 19, 79 => 18, 72 => 15, 70 => 14, 67 => 13, 65 => 12, 61 => 11, 57 => 10, 50 => 6, 47 => 5, 44 => 4, 40 => 2, 37 => 1,); } public function getSourceContext() { return new Source("", "table/relation/common_form.twig", "/var/www/localhost/htdocs/phpmyadmin/templates/table/relation/common_form.twig"); } }