开发者

Drupal Module: PHP: Object Oriented: Galatranet Leave Management System

I have to tweak this module so that it will not deduct employee's leave when it comes to Saturday, Sunday and public holidays. I have my way around php but I have no idea when it comes to object oriented programming. can anyone explain to me what this block of quote means? especially "$node->frmdate" and "$node->todate"

function leavemgt_update($node) {

  if ($node->revision) {
    leavemgt_insert($node);
  }
  el开发者_高级运维se {

  $node->frmdate = mktime(0,0,0, $node->frmdate['month'], $node->frmdate['day'],$node->frmdate['year']);
  $node->todate = mktime(0,0,0, $node->todate['month'], $node->todate['day'],$node->todate['year']);
  $date1 = format_date($node->frmdate, $type = 'custom', $format = 'd/m/Y', $timezone = NULL, $langcode = NULL);
  $date2 = format_date($node->todate, $type = 'custom', $format = 'd/m/Y', $timezone = NULL, $langcode = NULL);
  $diff= (dateDiff("/",$date2,$date1)+1);


In Drupal, $node is standard Class Object which contains all information about node and every nodes

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜