<?php 

class NoteTextArea  {
  private $scope;
  private $label;
  private $dbValue;
  private $dbRowId;
  private $iterator;
  private $areaRows;

  public function __construct($entry) {

    if (isset($entry)) {
      $this->scope    = $entry->scope;
      $this->dbValue  = $entry->dbValue;
      $this->dbRowId  = $entry->dbRowId;
      $this->iterator = $entry->iterator;
      $this->areaRows = $entry->areaRows;

      if (isset($entry->label))
        $this->label = "<label for='text$this->scope'>$entry->label</label><br>";
      else
        $this->label = "";
              
      if (isset($entry->placeholder))
        $this->placeholder = "placeholder='$entry->placeholder'";
      else
        $this->spaceholder = "";

      }
  }

  public function outputLayout() {


    $layout = "
      <label style='width:100%'>$this->label
        <textarea rows='$this->areaRows' id='text$this->scope' class='$this->iterator'
          name='$this->scope' $this->placeholder>$this->dbValue</textarea>
      </label>    
     ";
  
 	return $layout;
  }	

  public function outputScript() {

	$script = "
	  
    "; 
    return $script;
  }
}

?>