Item::getTitle PHP Method

getTitle() public method

得到商品标题
public getTitle ( ) : type
return type
    public function getTitle()
    {
        return CHtml::link(F::msubstr($this->title, '0', '40', 'utf-8'), array('/item/view', 'id' => $this->item_id), array('title' => $this->title));
    }

Usage Example

Example #1
0
 public function insert(Category $category, Subcategory $subcategory, Brand $brand, Item $item)
 {
     //        $sql = "INSERT INTO item values (null, 'aalluu', 'asdfasd',true,true, '2015-10-10','asdfasf', 'asdfasd', 1, 1 ,1, 1)";
     $sql = "INSERT INTO item values (null, '" . $item->getTitle() . "','" . $item->getDetail() . "',true,false, '" . $item->getDate() . "', '" . $item->getLocation() . "','asfasf'," . $category->getId() . "," . $subcategory->getId() . ", 1 ," . $brand->getId() . ")";
     echo $sql;
     if ($this->conn->query($sql) === TRUE) {
         echo "Insert operation successful";
     } else {
         echo "Error inserting: ";
     }
 }
All Usage Examples Of Item::getTitle