Guest User

Untitled

a guest
Jan 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.84 KB | None | 0 0
  1. ## Output of var_dump($form)
  2.  
  3. array(28) {
  4. ["#parents"]=>
  5. array(0) {
  6. }
  7. ["#method"]=>
  8. string(4) "post"
  9. ["#tree"]=>
  10. bool(false)
  11. ["#required"]=>
  12. bool(false)
  13. ["#attributes"]=>
  14. array(0) {
  15. }
  16. ["#after_build"]=>
  17. array(1) {
  18. [0]=>
  19. string(20) "wysiwyg_process_form"
  20. }
  21. ["#post"]=>
  22. array(0) {
  23. }
  24. ["#theme"]=>
  25. string(13) "finder_form_5"
  26. ["#after_build_done"]=>
  27. bool(true)
  28. ["#defaults_loaded"]=>
  29. bool(true)
  30. ["#processed"]=>
  31. bool(false)
  32. ["#description"]=>
  33. NULL
  34. ["#id"]=>
  35. string(13) "finder-form-5"
  36. ["#parameters"]=>
  37. array(3) {
  38. [0]=>
  39. string(13) "finder_form_5"
  40. [1]=>
  41. array(3) {
  42. ["storage"]=>
  43. NULL
  44. ["submitted"]=>
  45. bool(false)
  46. ["post"]=>
  47. array(0) {
  48. }
  49. }
  50. [2]=>
  51. object(stdClass)#365 (14) {
  52. ["finder_id"]=>
  53. string(1) "5"
  54. ["base"]=>
  55. string(5) "views"
  56. ["title"]=>
  57. string(13) "Find a Member"
  58. ["description"]=>
  59. string(0) ""
  60. ["path"]=>
  61. string(14) "finder/surname"
  62. ["block"]=>
  63. string(1) "1"
  64. ["settings"]=>
  65. array(4) {
  66. ["form_on_page"]=>
  67. int(1)
  68. ["form"]=>
  69. array(6) {
  70. ["prefix"]=>
  71. string(0) ""
  72. ["prefix_format"]=>
  73. string(1) "1"
  74. ["suffix"]=>
  75. string(0) ""
  76. ["suffix_format"]=>
  77. string(1) "1"
  78. ["button_text"]=>
  79. string(2) "Go"
  80. ["go_text"]=>
  81. string(2) "Go"
  82. }
  83. ["advanced"]=>
  84. array(17) {
  85. ["no_results"]=>
  86. array(1) {
  87. ["no_results"]=>
  88. string(31) "There are no results to display"
  89. }
  90. ["filter"]=>
  91. int(0)
  92. ["submission"]=>
  93. int(1)
  94. ["ahah"]=>
  95. int(0)
  96. ["ahah_effect"]=>
  97. string(4) "none"
  98. ["ahah_remote"]=>
  99. int(0)
  100. ["element_combination"]=>
  101. string(1) "2"
  102. ["pager"]=>
  103. string(2) "10"
  104. ["goto"]=>
  105. string(0) ""
  106. ["hide_args"]=>
  107. int(0)
  108. ["arg_sep"]=>
  109. string(1) ","
  110. ["empty_symbol"]=>
  111. string(0) ""
  112. ["show_links"]=>
  113. int(0)
  114. ["show_admin_links"]=>
  115. int(1)
  116. ["cache_finder_find"]=>
  117. string(1) "0"
  118. ["search"]=>
  119. string(1) "0"
  120. ["search_tab"]=>
  121. string(4) "node"
  122. }
  123. ["views"]=>
  124. array(4) {
  125. ["view"]=>
  126. string(7) "profile"
  127. ["displays"]=>
  128. array(2) {
  129. ["query"]=>
  130. string(7) "block_7"
  131. ["output"]=>
  132. string(7) "block_7"
  133. }
  134. ["results"]=>
  135. string(1) "0"
  136. ["views_args"]=>
  137. array(2) {
  138. ["args"]=>
  139. string(0) ""
  140. ["delimiter"]=>
  141. string(1) "/"
  142. }
  143. }
  144. }
  145. ["elements"]=>
  146. array(2) {
  147. [6]=>
  148. object(stdClass)#333 (7) {
  149. ["finder_element_id"]=>
  150. string(1) "6"
  151. ["finder_id"]=>
  152. string(1) "5"
  153. ["element"]=>
  154. string(4) "text"
  155. ["title"]=>
  156. string(10) "By Surname"
  157. ["weight"]=>
  158. string(1) "0"
  159. ["settings"]=>
  160. array(3) {
  161. ["form"]=>
  162. array(13) {
  163. ["description"]=>
  164. string(0) ""
  165. ["prefix"]=>
  166. string(0) ""
  167. ["prefix_format"]=>
  168. string(1) "1"
  169. ["suffix"]=>
  170. string(0) ""
  171. ["suffix_format"]=>
  172. string(1) "1"
  173. ["default_value"]=>
  174. string(0) ""
  175. ["required"]=>
  176. int(0)
  177. ["field_prefix"]=>
  178. string(0) ""
  179. ["field_suffix"]=>
  180. string(0) ""
  181. ["maxlength"]=>
  182. string(0) ""
  183. ["minlength"]=>
  184. string(0) ""
  185. ["size"]=>
  186. string(2) "20"
  187. ["rows"]=>
  188. string(1) "0"
  189. }
  190. ["choices"]=>
  191. array(3) {
  192. ["field"]=>
  193. array(1) {
  194. ["node_data_field_profile_surname.field_profile_surname_value"]=>
  195. string(59) "node_data_field_profile_surname.field_profile_surname_value"
  196. }
  197. ["displays"]=>
  198. array(1) {
  199. ["query"]=>
  200. string(7) "block_7"
  201. }
  202. ["views"]=>
  203. array(2) {
  204. ["args"]=>
  205. string(7) "$finder"
  206. ["delimiter"]=>
  207. string(1) "/"
  208. }
  209. }
  210. ["advanced"]=>
  211. array(3) {
  212. ["delimit"]=>
  213. string(0) ""
  214. ["value_combination"]=>
  215. string(1) "0"
  216. ["match"]=>
  217. string(1) "c"
  218. }
  219. }
  220. ["element_handler"]=>
  221. array(2) {
  222. ["#title"]=>
  223. string(4) "Text"
  224. ["#module"]=>
  225. string(11) "finder_text"
  226. }
  227. }
  228. [0]=>
  229. object(stdClass)#350 (7) {
  230. ["finder_element_id"]=>
  231. string(1) "6"
  232. ["finder_id"]=>
  233. string(1) "5"
  234. ["element"]=>
  235. string(4) "text"
  236. ["title"]=>
  237. string(10) "By Surname"
  238. ["weight"]=>
  239. string(1) "0"
  240. ["settings"]=>
  241. array(3) {
  242. ["form"]=>
  243. array(13) {
  244. ["description"]=>
  245. string(0) ""
  246. ["prefix"]=>
  247. string(0) ""
  248. ["prefix_format"]=>
  249. string(1) "1"
  250. ["suffix"]=>
  251. string(0) ""
  252. ["suffix_format"]=>
  253. string(1) "1"
  254. ["default_value"]=>
  255. string(0) ""
  256. ["required"]=>
  257. int(0)
  258. ["field_prefix"]=>
  259. string(0) ""
  260. ["field_suffix"]=>
  261. string(0) ""
  262. ["maxlength"]=>
  263. string(0) ""
  264. ["minlength"]=>
  265. string(0) ""
  266. ["size"]=>
  267. string(2) "20"
  268. ["rows"]=>
  269. string(1) "0"
  270. }
  271. ["choices"]=>
  272. array(3) {
  273. ["field"]=>
  274. array(1) {
  275. ["node_data_field_profile_surname.field_profile_surname_value"]=>
  276. string(59) "node_data_field_profile_surname.field_profile_surname_value"
  277. }
  278. ["displays"]=>
  279. array(1) {
  280. ["query"]=>
  281. string(7) "block_7"
  282. }
  283. ["views"]=>
  284. array(2) {
  285. ["args"]=>
  286. string(7) "$finder"
  287. ["delimiter"]=>
  288. string(1) "/"
  289. }
  290. }
  291. ["advanced"]=>
  292. array(3) {
  293. ["delimit"]=>
  294. string(0) ""
  295. ["value_combination"]=>
  296. string(1) "0"
  297. ["match"]=>
  298. string(1) "c"
  299. }
  300. }
  301. ["element_handler"]=>
  302. array(2) {
  303. ["#title"]=>
  304. string(4) "Text"
  305. ["#module"]=>
  306. string(11) "finder_text"
  307. }
  308. }
  309. }
  310. ["elements_index"]=>
  311. array(1) {
  312. [6]=>
  313. int(0)
  314. }
  315. ["base_handler"]=>
  316. array(2) {
  317. ["#title"]=>
  318. string(12) "Views finder"
  319. ["#module"]=>
  320. string(12) "finder_views"
  321. }
  322. ["admin_links"]=>
  323. array(2) {
  324. ["finder/surname"]=>
  325. string(11) "View "Path""
  326. ["admin/build/finder/5/edit"]=>
  327. string(4) "Edit"
  328. }
  329. ["links"]=>
  330. array(0) {
  331. }
  332. ["finder_view_build_id"]=>
  333. string(22) "finder-block-5-wrapper"
  334. ["finder_view_build_display"]=>
  335. string(5) "block"
  336. }
  337. }
  338. ["#build_id"]=>
  339. string(37) "form-3b1e1f81b9e85532a912ed0f53995961"
  340. ["#submit"]=>
  341. array(2) {
  342. [0]=>
  343. string(18) "finder_form_submit"
  344. [1]=>
  345. string(27) "inline_messages_submit_form"
  346. }
  347. ["finder_form"]=>
  348. array(12) {
  349. ["#weight"]=>
  350. int(0)
  351. ["#prefix"]=>
  352. string(34) "<div class="finder-form finder-5">"
  353. ["#suffix"]=>
  354. string(6) "</div>"
  355. [6]=>
  356. array(27) {
  357. ["#title"]=>
  358. string(10) "By Surname"
  359. ["#weight"]=>
  360. string(1) "0"
  361. ["#description"]=>
  362. string(0) ""
  363. ["#prefix"]=>
  364. string(0) ""
  365. ["#suffix"]=>
  366. string(0) ""
  367. ["#default_value"]=>
  368. string(0) ""
  369. ["#required"]=>
  370. int(0)
  371. ["#executes_submit_callback"]=>
  372. bool(true)
  373. ["#type"]=>
  374. string(9) "textfield"
  375. ["#size"]=>
  376. string(2) "20"
  377. ["#element_validate"]=>
  378. array(1) {
  379. [0]=>
  380. string(35) "finder_text_finder_element_validate"
  381. }
  382. ["#post"]=>
  383. array(0) {
  384. }
  385. ["#programmed"]=>
  386. bool(false)
  387. ["#tree"]=>
  388. bool(false)
  389. ["#parents"]=>
  390. array(1) {
  391. [0]=>
  392. int(6)
  393. }
  394. ["#array_parents"]=>
  395. array(2) {
  396. [0]=>
  397. string(11) "finder_form"
  398. [1]=>
  399. int(6)
  400. }
  401. ["#processed"]=>
  402. bool(true)
  403. ["#attributes"]=>
  404. array(0) {
  405. }
  406. ["#input"]=>
  407. bool(true)
  408. ["#maxlength"]=>
  409. int(128)
  410. ["#autocomplete_path"]=>
  411. bool(false)
  412. ["#process"]=>
  413. array(1) {
  414. [0]=>
  415. string(16) "form_expand_ahah"
  416. }
  417. ["#name"]=>
  418. int(6)
  419. ["#id"]=>
  420. string(6) "edit-6"
  421. ["#value"]=>
  422. string(0) ""
  423. ["#defaults_loaded"]=>
  424. bool(true)
  425. ["#sorted"]=>
  426. bool(true)
  427. }
  428. ["submit"]=>
  429. array(20) {
  430. ["#type"]=>
  431. string(6) "submit"
  432. ["#name"]=>
  433. string(4) "find"
  434. ["#value"]=>
  435. string(2) "Go"
  436. ["#weight"]=>
  437. int(1000)
  438. ["#post"]=>
  439. array(0) {
  440. }
  441. ["#programmed"]=>
  442. bool(false)
  443. ["#tree"]=>
  444. bool(false)
  445. ["#parents"]=>
  446. array(1) {
  447. [0]=>
  448. string(6) "submit"
  449. }
  450. ["#array_parents"]=>
  451. array(2) {
  452. [0]=>
  453. string(11) "finder_form"
  454. [1]=>
  455. string(6) "submit"
  456. }
  457. ["#processed"]=>
  458. bool(true)
  459. ["#description"]=>
  460. NULL
  461. ["#attributes"]=>
  462. array(0) {
  463. }
  464. ["#required"]=>
  465. bool(false)
  466. ["#input"]=>
  467. bool(true)
  468. ["#button_type"]=>
  469. string(6) "submit"
  470. ["#executes_submit_callback"]=>
  471. bool(true)
  472. ["#process"]=>
  473. array(1) {
  474. [0]=>
  475. string(16) "form_expand_ahah"
  476. }
  477. ["#id"]=>
  478. string(13) "edit-submit-1"
  479. ["#defaults_loaded"]=>
  480. bool(true)
  481. ["#sorted"]=>
  482. bool(true)
  483. }
  484. ["#post"]=>
  485. array(0) {
  486. }
  487. ["#programmed"]=>
  488. bool(false)
  489. ["#tree"]=>
  490. bool(false)
  491. ["#parents"]=>
  492. array(1) {
  493. [0]=>
  494. string(11) "finder_form"
  495. }
  496. ["#array_parents"]=>
  497. array(1) {
  498. [0]=>
  499. string(11) "finder_form"
  500. }
  501. ["#processed"]=>
  502. bool(false)
  503. ["#defaults_loaded"]=>
  504. bool(true)
  505. }
  506. ["#action"]=>
  507. string(15) "/finder/surname"
  508. ["#type"]=>
  509. string(6) "markup"
  510. ["#programmed"]=>
  511. bool(false)
  512. ["finder_id"]=>
  513. array(17) {
  514. ["#type"]=>
  515. string(5) "value"
  516. ["#value"]=>
  517. string(1) "5"
  518. ["#post"]=>
  519. array(0) {
  520. }
  521. ["#programmed"]=>
  522. bool(false)
  523. ["#tree"]=>
  524. bool(false)
  525. ["#parents"]=>
  526. array(1) {
  527. [0]=>
  528. string(9) "finder_id"
  529. }
  530. ["#array_parents"]=>
  531. array(1) {
  532. [0]=>
  533. string(9) "finder_id"
  534. }
  535. ["#weight"]=>
  536. int(0)
  537. ["#processed"]=>
  538. bool(false)
  539. ["#description"]=>
  540. NULL
  541. ["#attributes"]=>
  542. array(0) {
  543. }
  544. ["#required"]=>
  545. bool(false)
  546. ["#input"]=>
  547. bool(true)
  548. ["#name"]=>
  549. string(9) "finder_id"
  550. ["#id"]=>
  551. string(14) "edit-finder-id"
  552. ["#defaults_loaded"]=>
  553. bool(true)
  554. ["#sorted"]=>
  555. bool(true)
  556. }
  557. ["#token"]=>
  558. string(13) "finder_form_5"
  559. ["form_build_id"]=>
  560. array(18) {
  561. ["#type"]=>
  562. string(6) "hidden"
  563. ["#value"]=>
  564. string(37) "form-3b1e1f81b9e85532a912ed0f53995961"
  565. ["#id"]=>
  566. string(37) "form-3b1e1f81b9e85532a912ed0f53995961"
  567. ["#name"]=>
  568. string(13) "form_build_id"
  569. ["#post"]=>
  570. array(0) {
  571. }
  572. ["#programmed"]=>
  573. bool(false)
  574. ["#tree"]=>
  575. bool(false)
  576. ["#parents"]=>
  577. array(1) {
  578. [0]=>
  579. string(13) "form_build_id"
  580. }
  581. ["#array_parents"]=>
  582. array(1) {
  583. [0]=>
  584. string(13) "form_build_id"
  585. }
  586. ["#weight"]=>
  587. float(0.002)
  588. ["#processed"]=>
  589. bool(true)
  590. ["#description"]=>
  591. NULL
  592. ["#attributes"]=>
  593. array(0) {
  594. }
  595. ["#required"]=>
  596. bool(false)
  597. ["#input"]=>
  598. bool(true)
  599. ["#process"]=>
  600. array(1) {
  601. [0]=>
  602. string(16) "form_expand_ahah"
  603. }
  604. ["#defaults_loaded"]=>
  605. bool(true)
  606. ["#sorted"]=>
  607. bool(true)
  608. }
  609. ["form_token"]=>
  610. array(18) {
  611. ["#id"]=>
  612. string(29) "edit-finder-form-5-form-token"
  613. ["#type"]=>
  614. string(5) "token"
  615. ["#default_value"]=>
  616. string(32) "057a02c919143d472686654e6b6d4388"
  617. ["#post"]=>
  618. array(0) {
  619. }
  620. ["#programmed"]=>
  621. bool(false)
  622. ["#tree"]=>
  623. bool(false)
  624. ["#parents"]=>
  625. array(1) {
  626. [0]=>
  627. string(10) "form_token"
  628. }
  629. ["#array_parents"]=>
  630. array(1) {
  631. [0]=>
  632. string(10) "form_token"
  633. }
  634. ["#weight"]=>
  635. float(0.003)
  636. ["#processed"]=>
  637. bool(false)
  638. ["#description"]=>
  639. NULL
  640. ["#attributes"]=>
  641. array(0) {
  642. }
  643. ["#required"]=>
  644. bool(false)
  645. ["#input"]=>
  646. bool(true)
  647. ["#name"]=>
  648. string(10) "form_token"
  649. ["#value"]=>
  650. string(32) "057a02c919143d472686654e6b6d4388"
  651. ["#defaults_loaded"]=>
  652. bool(true)
  653. ["#sorted"]=>
  654. bool(true)
  655. }
  656. ["form_id"]=>
  657. array(18) {
  658. ["#type"]=>
  659. string(6) "hidden"
  660. ["#value"]=>
  661. string(13) "finder_form_5"
  662. ["#id"]=>
  663. string(18) "edit-finder-form-5"
  664. ["#post"]=>
  665. array(0) {
  666. }
  667. ["#programmed"]=>
  668. bool(false)
  669. ["#tree"]=>
  670. bool(false)
  671. ["#parents"]=>
  672. array(1) {
  673. [0]=>
  674. string(7) "form_id"
  675. }
  676. ["#array_parents"]=>
  677. array(1) {
  678. [0]=>
  679. string(7) "form_id"
  680. }
  681. ["#weight"]=>
  682. float(0.004)
  683. ["#processed"]=>
  684. bool(true)
  685. ["#description"]=>
  686. NULL
  687. ["#attributes"]=>
  688. array(0) {
  689. }
  690. ["#required"]=>
  691. bool(false)
  692. ["#input"]=>
  693. bool(true)
  694. ["#process"]=>
  695. array(1) {
  696. [0]=>
  697. string(16) "form_expand_ahah"
  698. }
  699. ["#name"]=>
  700. string(7) "form_id"
  701. ["#defaults_loaded"]=>
  702. bool(true)
  703. ["#sorted"]=>
  704. bool(true)
  705. }
  706. ["#title"]=>
  707. NULL
  708. ["#theme_used"]=>
  709. bool(true)
  710. ["#value"]=>
  711. string(0) ""
  712. }
  713.  
  714. ## Hook overwrites in template.php
  715.  
  716. function geh_theme() {
  717. $hooks['finder_form_5'] = array(
  718. 'arguments' => array('form' => NULL),
  719. );
  720. return $hooks;
  721. }
  722.  
  723. function geh_finder_form_5($form) {
  724. $form['submit'] = array(
  725. '#id' => 'edit-submit-1',
  726. '#type' => 'image_button',
  727. '#title' => t('Go'),
  728. '#value' => t('Go'),
  729. '#src' => path_to_theme().'/images/btn-member-search.png',
  730. '#name' => t('find'),
  731. '#weight' => $form['submit'],
  732. );
  733. return drupal_render($form);
  734. }
Add Comment
Please, Sign In to add comment