/doc/core/m_persistent.html

http://github.com/zotonic/zotonic · HTML · 66 lines · 55 code · 11 blank · 0 comment · 0 complexity · 9c6714eff6fbf57bbd8ab238efb676e0 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Module m_persistent</title>
  5. <link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
  6. </head>
  7. <body bgcolor="white">
  8. <div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
  9. <hr>
  10. <h1>Module m_persistent</h1>
  11. <ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Model for accessing the persistent variables from a template.
  12. <p>Copyright Š 2009 Marc Worrell
  13. Date: 2009-11-20
  14. </p>
  15. <p><b>Behaviours:</b> <a href="gen_model.html"><tt>gen_model</tt></a>.</p>
  16. <p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
  17. <h2><a name="description">Description</a></h2>Model for accessing the persistent variables from a template.
  18. <h2><a name="index">Function Index</a></h2>
  19. <table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#get-2">get/2</a></td><td>Select full row by persistent id.</td></tr>
  20. <tr><td valign="top"><a href="#get_props-2">get_props/2</a></td><td>Get only stored (persistent) props for session by id.</td></tr>
  21. <tr><td valign="top"><a href="#m_find_value-3">m_find_value/3</a></td><td>Fetch the value for the key from a model source.</td></tr>
  22. <tr><td valign="top"><a href="#m_to_list-2">m_to_list/2</a></td><td>Transform a m_config value to a list, used for template loops.</td></tr>
  23. <tr><td valign="top"><a href="#m_value-2">m_value/2</a></td><td>Transform a model value so that it can be formatted or piped through filters.</td></tr>
  24. <tr><td valign="top"><a href="#put-3">put/3</a></td><td>Save new persistent session data.</td></tr>
  25. </table>
  26. <h2><a name="functions">Function Details</a></h2>
  27. <h3 class="function"><a name="get-2">get/2</a></h3>
  28. <div class="spec">
  29. <p><tt>get(Id, Context) -&gt; any()</tt></p>
  30. </div><p>Select full row by persistent id.</p>
  31. <h3 class="function"><a name="get_props-2">get_props/2</a></h3>
  32. <div class="spec">
  33. <p><tt>get_props(Id, Context) -&gt; any()</tt></p>
  34. </div><p>Get only stored (persistent) props for session by id.</p>
  35. <h3 class="function"><a name="m_find_value-3">m_find_value/3</a></h3>
  36. <div class="spec">
  37. <p><tt>m_find_value(Key, M, Context) -&gt; any()</tt></p>
  38. </div><p>Fetch the value for the key from a model source</p>
  39. <h3 class="function"><a name="m_to_list-2">m_to_list/2</a></h3>
  40. <div class="spec">
  41. <p><tt>m_to_list(M, Context) -&gt; any()</tt></p>
  42. </div><p>Transform a m_config value to a list, used for template loops</p>
  43. <h3 class="function"><a name="m_value-2">m_value/2</a></h3>
  44. <div class="spec">
  45. <p><tt>m_value(M, Context) -&gt; any()</tt></p>
  46. </div><p>Transform a model value so that it can be formatted or piped through filters</p>
  47. <h3 class="function"><a name="put-3">put/3</a></h3>
  48. <div class="spec">
  49. <p><tt>put(Id, Props, Context) -&gt; any()</tt></p>
  50. </div><p>Save new persistent session data.</p>
  51. <hr>
  52. <div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
  53. <p><i>Generated by EDoc, Oct 13 2011, 14:45:56.</i></p>
  54. </body>
  55. </html>