สอบถามฟังก์ชัน Access::getActions() ใน joomla 5 ใช้ฟังก์ชันตัวไหนแทนครับ

ถามตอบ ปัญหาการพัฒนา Extension ไม่ว่าจะเป็น Module plugin Component หรือ แม้แต่ template การปรับแต่งโค้ด Joomla ต่างๆ ทุกเวอร์ชั่น 1.5 2.5 หรือ 3.x

Moderator: mindphp, ผู้ดูแลกระดาน

ภาพประจำตัวสมาชิก
Thanapoom1514
PHP VIP Members
PHP VIP Members
โพสต์: 4329
ลงทะเบียนเมื่อ: 04/07/2022 9:46 am

สอบถามฟังก์ชัน Access::getActions() ใน joomla 5 ใช้ฟังก์ชันตัวไหนแทนครับ

โพสต์ที่ยังไม่ได้อ่าน โดย Thanapoom1514 »

ลองติดตั้ง component ใน joomla 5 ขึ้นไม่รู้จัก getActions() ตัวนี้ครับ ในคลาส Access ใช้ getActions() ตัวไหนแทนครับ
An error has occurred.
0 Call to undefined method Joomla\CMS\Access\Access::getActions()
Joomla Development-1.png
Joomla Development-1.png (41.72 KiB) Viewed 2769 times

โค้ด: เลือกทั้งหมด

$actions = Access::getActions($component);
โค้ด

โค้ด: เลือกทั้งหมด

	public function getActions($component = 'com_mdfiles')
	{
		$user = JFactory::getUser();
		$result = new JObject;

		$actions = JAccess::getActions($component);
		foreach ($actions as $action)
		{
			$result->set($action->name, $user->authorise($action->name, $component));
		}

		return $result;
	}
:gfb:
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 47880
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: สอบถามฟังก์ชัน Access::getActions() ใน joomla 5 ใช้ฟังก์ชันตัวไหนแทนครับ

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

เรื่องนี้ลองใช้คำค้น acl
ดูจาก class หลักก่อนสำหรับ v5 ยังไม่มีคู่มือ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 0