{"id":727,"date":"2009-01-11T00:40:47","date_gmt":"2009-01-10T15:40:47","guid":{"rendered":"http:\/\/www.kazu.tv\/blog\/?p=727"},"modified":"2009-01-11T00:40:47","modified_gmt":"2009-01-10T15:40:47","slug":"knowledgetree3","status":"publish","type":"post","link":"https:\/\/kazu.tv\/blog\/2009\/01\/11\/knowledgetree3\/","title":{"rendered":"KnowledgeTree\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u62103\uff1f"},"content":{"rendered":"<p>\u3068\u308a\u3042\u3048\u305a\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5b8c\u6210\u3057\u305f\u306e\u3067\u3001\u30dc\u30c1\u30dc\u30c1\u89e3\u8aac\u3057\u3066\u3044\u304f\u3002\u30bd\u30fc\u30b9\u306fSubversion\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u3069\u3046\u305e\u3002<br \/>http:\/\/kazu.tv\/svn\/docdiff\/trunk\/<\/p>\n<p>DocumentDiffAction\u306b\u306f\u91cd\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u304c2\u3064\u3042\u308b\u3002\n<\/p>\n<ul>\n<li>do_main<\/li>\n<li>do_viewComparison<\/li>\n<\/ul>\n<p>\u6587\u66f8\u3092\u9078\u629e\u3057\u3066\u3001\u753b\u9762\u53f3\u306eDiff\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u6642\u306b\u547c\u3070\u308c\u308b\u306e\u304c\u524d\u8005\u3067\u3001\u5dee\u5206\u3092\u53d6\u308a\u305f\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u6642\u306b\u547c\u3070\u308c\u308b\u306e\u304c\u5f8c\u8005\u3002<\/p>\n<p>\u307e\u305a\u306fdo_main\u304b\u3089\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u30b3\u30e1\u30f3\u30c8\u306b\u3082\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u3001KTDocumentVersionHistoryAction\u306e\u5185\u5bb9\u3092\u30b3\u30d4\u30fc\u3057\u3066\u6539\u5909\u3057\u305f\u3082\u306e\u3002<\/p>\n<p>\u6700\u521d\u306e\u307b\u3046\u306f\u7279\u306b\u4fee\u6b63\u3057\u3066\u3044\u306a\u3044\u3002\u91cd\u8981\u306a\u306e\u306f\u6b21\u306e\u884c\u304b\u3089\u3002<\/p>\n<pre><code>    $aMetadataVersions =\nKTDocumentMetadataVersion::getByDocument($this-&gt;oDocument);\n$aVersions = array();\nforeach ($aMetadataVersions as $oVersion) {\n\/\/$version is an instance of Document class.\n$version = Document::get($this-&gt;oDocument-&gt;getId(), $oVersion-&gt;getId());\nif($showall){\n$aVersions[] = $version;\n}else if($version-&gt;getMetadataStatusID() != VERSION_DELETED){\n$aVersions[] = $version;\n}\n}\n<\/code><\/pre>\n<p>\u3053\u3053\u3067\u306f\u3001\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u6587\u66f8\u306e\u904e\u53bb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u3002\u904e\u53bb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u4e00\u89a7\u304cKTDocumentMetadataVersion::getByDocument\u3067\u53d6\u5f97\u3067\u304d\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u30eb\u30fc\u30d7\u3067\u56de\u3057\u3066\u3001\u5404\u30d0\u30fc\u30b8\u30e7\u30f3\u306eDocument\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092Document::get\u3067\u53d6\u5f97\u3057\u3066\u3001\u524a\u9664\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306a\u3051\u308c\u3070aVersions\u3068\u3044\u3046\u914d\u5217\u306b\u683c\u7d0d\u3057\u3066\u308b\u3002<\/p>\n<p>\u6587\u66f8\u95a2\u9023\u306e\u30af\u30e9\u30b9\u306f\u7d50\u69cb\u6ca2\u5c71\u3042\u3063\u3066\u6df7\u4e71\u3057\u3061\u3083\u3044\u305d\u3046\u306a\u306e\u3067\u3001\u4eca\u5ea6\u30af\u30e9\u30b9\u56f3\u306b\u3067\u3082\u307e\u3068\u3081\u3088\u3046\u304b\u3068\u601d\u3046\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u306b\u3001Smarty\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u547c\u3073\u51fa\u3059\u969b\u306b\u904e\u53bb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e00\u89a7\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u308b\u3002\u3064\u307e\u308a\u3001do_main\u306fMVC\u3067\u3044\u3046\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u3001V\u306f\u5f53\u7136Smarty\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3001M\u306fDocument\u30af\u30e9\u30b9\u306e\u914d\u5217\u3002<\/p>\n<p>do_main\u304c\u8fd4\u3059\u6587\u5b57\u5217\u3001\u3064\u307e\u308aSmarty\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30ec\u30f3\u30c0\u30fc\u3057\u305f\u7d50\u679c\u304c\u5b9f\u969b\u306b\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u308b\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u308b\u6642\u306b\u3001\u672c\u5f53\u306b\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u3066\u308b\u306e\u304b\uff1f\u3063\u3066\u601d\u3063\u305f\u6642\u306b\u306f\u3001\u3068\u308a\u3042\u3048\u305areturn &#8220;test\u30c6\u30b9\u30c8&#8221;\u3068\u304b\u3084\u3063\u3066\u3001\u305d\u306e\u6587\u5b57\u5217\u304c\u753b\u9762\u306b\u73fe\u308c\u308b\u304b\u3069\u3046\u304b\u3067\u78ba\u8a8d\u3067\u304d\u308b\u3002<\/p>\n<pre><code>    $aActions = KTDocumentActionUtil::getDocumentActionsByNames(\narray('ktcore.actions.document.view'));\n$oAction = $aActions[0];\n$oAction-&gt;setDocument($this-&gt;oDocument);\n\/\/ Data to be passed to the template.\n$aTemplateData = array(\n'context' =&gt; $this,\n'document_id' =&gt; $this-&gt;oDocument-&gt;getId(),\n'document' =&gt; $this-&gt;oDocument,\n'versions' =&gt; $aVersions,\n'downloadaction' =&gt; $oAction,\n'showdelete' =&gt; $bShowDelete,\n'showall' =&gt; $showall,\n'bShowCompare' =&gt; $bShowCompare,\n'bShowVersionCompare' =&gt; $bShowVersionCompare,\n'sUrl' =&gt; $sUrl\n);\nreturn $oTemplate-&gt;render($aTemplateData);\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3068\u308a\u3042\u3048\u305a\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5b8c\u6210\u3057\u305f\u306e\u3067\u3001\u30dc\u30c1\u30dc\u30c1\u89e3\u8aac\u3057\u3066\u3044\u304f\u3002\u30bd\u30fc\u30b9\u306fSubversion\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u3069\u3046\u305e\u3002http:\/\/kazu.tv\/svn\/docdiff\/trunk\/ DocumentDiffAction\u306b\u306f\u91cd&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[367],"tags":[955,436,372],"class_list":["post-727","post","type-post","status-publish","format-standard","hentry","category-knowledgetree","tag-knowledgetree","tag-plugin","tag-372"],"_links":{"self":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/comments?post=727"}],"version-history":[{"count":0,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/727\/revisions"}],"wp:attachment":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/media?parent=727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/categories?post=727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/tags?post=727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}