$ comment 객체의 (또는 어떤 인스턴스의) 모든 멤버 목록이 필요합니다. 이것을 생성하는 가장 좋은 방법은 무엇입니까? 정의를 쉽게 찾을 수있는 드루팔 (Drupal) 소스 코드가 있습니까 (나는 보았지만 말랐습니다)?
$ node 객체는 다음과 같습니다. http://drupal.org/node/49768 (물론 설명이없는 경우에만 해당).
$ comment 객체의 (또는 어떤 인스턴스의) 모든 멤버 목록이 필요합니다. 이것을 생성하는 가장 좋은 방법은 무엇입니까? 정의를 쉽게 찾을 수있는 드루팔 (Drupal) 소스 코드가 있습니까 (나는 보았지만 말랐습니다)?
$ node 객체는 다음과 같습니다. http://drupal.org/node/49768 (물론 설명이없는 경우에만 해당).
당신은 Devel module의 dpm() 기능을 통해 $ 주석을 보낼 수 :
dpm($comment);
전화하세요. 아마 오래 전에 사용하기 시작한 모듈 일 겁니다. – ak112358
을 시도해보십시오 comment_load_multiple()
<?php
$conditions = array("pid" => $comment_you_want_the_children_of->id);
comment_load_multiple(array(), $conditions);
?>
방화범에 대한 드루팔을 얻을 - http://drupal.org/project/drupalforfirebug을 -도에 대한 링크가 포함 방화범이 끌리는 파이어 폭스 확장을위한 Drupal 은 방화범이 끌려요. 이것은 덤프 데이터를 해야 할 때 많은 고통을 덜어줍니다. 코드 firep($someVar)
에 을 쓰고 덤프는 방화 광구 창에 으로 표시됩니다. (당신이 tpl.php 형 테마 엔진을 사용하는 경우) comment.tpl.php을 -
여기 드루팔 6 설치할가, 드루팔 7 다를 수 있습니다에서 덤프입니다 :
stdClass Object
(
[cid] => 1676
[pid] => 0
[nid] => 1672
[subject] => Comment Body
[comment] =>
Comment Body
[format] => 1
[timestamp] => 1300904186
[name] => admin
[mail] =>
[homepage] =>
[uid] => 1
[registered_name] => admin
[signature] =>
[signature_format] => 0
[picture] => sites/default/files/pictures/picture-1.jpg
[data] => a:7:{s:17:"messaging_default";s:4:"mail";s:6:"preset";s:18:"atrium_user_simple";s:14:"picture_delete";s:0:"";s:14:"picture_upload";s:0:"";s:13:"form_build_id";s:37:"form-5ab3ec10bc31bce9da52e443b0fa0651";s:27:"notifications_send_interval";s:1:"0";s:16:"comment_settings";s:0:"";}
[thread] => 01/
[status] => 0
[messaging_default] => mail
[preset] => atrium_user_simple
[picture_delete] =>
[picture_upload] =>
[form_build_id] => form-5ab3ec10bc31bce9da52e443b0fa0651
[notifications_send_interval] => 0
[comment_settings] =>
[depth] => 0
[new] => 0
)
어떤'인 print_r ($ 주석)가 않는다'당신을 줄? – drudge
그냥 "1"을 인쇄합니다 – ak112358
어쩌면 이것은 _hook_comment_presave ($ comment) _을 구현하고 있기 때문에 가능합니다. 아직 모든 속성이 없습니다. – ak112358