Esempio n. 1
0
 public function getLength()
 {
     if ($this->hasDynamicBlock()) {
         $ids = $this->getIdsOfDynamicBlocks();
         $length = $this->pl->getDbLength();
         foreach ($ids as $id) {
             $bl = new Application_Model_Block($id['id']);
             if ($bl->hasItemLimit()) {
                 return "N/A";
             }
         }
         $formatter = new LengthFormatter($length);
         return "~" . $formatter->format();
     } else {
         return $this->pl->getDbLength();
     }
 }