HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/education.creativefellows.nl/classes/EntryController.php
<?php
	
	class EntryController extends BaseController{

		function __construct($uid_entry, $fields, $entry_data, $form,$canvas_name)
		{	
			
			//d($uid_entry);
			$this->uid 			= $entry_data["unique_id"];
			$this->section_id 	= $uid_entry["sectie_id"];
			
			$this->position 	= $entry_data["position"];
			$this->status		= $entry_data["status"];
			$this->last_edit	= $entry_data["last_edit"];
			$this->form_id		= isset($entry_data["form_id"]) ? $entry_data["form_id"] : 0;
			$this->meta_title	= $entry_data["meta_title"];	
			$this->meta_desc	= $entry_data["meta_desc"];
			$this->redirect		= $entry_data["redirect"];
			$this->first_field	= $fields[0]["field_naam"];			
			$this->page_canvas	= $canvas_name;
			


			$this->entry_link	= $uid_entry["url"];			
			$this->form			= $form;
				
			foreach($fields as $i=> $f)
			{	
				$field_user 		= preg_replace("/[^0-9a-zA-Z]/","_",strtolower($f["field_naam"]));
				$this->$field_user 	= $f["html"];
				
				if($i == 0 && $this->meta_title == "") $this->meta_title = $this->$field_user;
				
			}
			
		
		}
		public function getProperty($name,$type=null){
			
			switch($type)
			{
				default:
					return $this->$name;
				break;
				
				case "img":
					return '<img src="'. $this->$name[0] .'"/>';
				break;
			}
			
		}
		
		public function getMetaTitle()
		{
			return $this->meta_title;
		}
		
		public function getMetaDesc()
		{
			return $this->meta_desc;
		}
		
		public function getForm()
		{
			return $this->form;
			
		}
	
		
	}
	
?>